<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template('member', 'header'); ?>
<?php
$CATEGORYS = getcache('category_content_1','commons');
$MODEL = getcache('model','commons');
?>
<div class="layui-member-center">
  <?php include template('member', 'left'); ?>
  <div class="layui-member-info">
    <div class="layui-member-content">
      <div class="layui-avatar"><a title="<?php echo L('modify').L('avatar');?>" href="index.php?m=member&c=index&a=account_manage_avatar&t=1"><img src="<?php echo $avatar['90'];?>" onerror="this.src='<?php echo $phpsso_api_url;?>/statics/images/member/nophoto.gif'"></a></div>
      <p class="layui-msg">嗨，<?php if($memberinfo['nickname']) { ?> <?php echo $memberinfo['nickname'];?> <?php } else { ?> <?php echo $memberinfo['username'];?><?php } ?>，欢迎你的到来！</p>
      <p class="layui-msg"><span>会员组：<em><?php echo $memberinfo['groupname'];?></em></span></p>
    </div>
    <div class="layui-member-favorite">
      <div class="layui-title"><h3>收藏夹</h3></div>
      <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"member\" data=\"op=member&tag_md5=11dc7dbd7169ee554da26a70016de5a9&action=favoritelist&userid=%24memberinfo%5Buserid%5D&num=20\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$member_tag = pc_base::load_app_class("member_tag", "member");if (method_exists($member_tag, 'favoritelist')) {$data = $member_tag->favoritelist(array('userid'=>$memberinfo[userid],'limit'=>'20',));}?>
        <ul class="layui-favorite-list">
        <?php $n=1; if(is_array($data)) foreach($data AS $k => $v) { ?>
        <?php $db = pc_base::load_model('content_model');$db->table_name = $db->db_tablepre.$MODEL[$v['modelid']]['tablename'];$_r = $db->get_one(array('id'=>$v['contentid']));?>
          <li><a href="<?php echo $_r['url'];?>" target="_blank"><img src="<?php echo $_r['thumb'];?>?x-oss-process=style/smallpic" alt="<?php echo $_r['title'];?>" /></a></li>
        <?php $n++;}unset($n); ?>
      </ul>
      <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
    </div>
  </div>
</div>
<script type="text/javascript" src="<?php echo JS_PATH;?>cookie.js"></script>
<script language="JavaScript">
<!--
$(document).ready(function() {
	var announcement = getcookie('announcement_<?php echo $memberinfo['userid'];?>_<?php echo $announceid;?>');
	if(announcement==null || announcement=='') {
		$("#announcement").fadeIn("slow");
	}
});
//-->
</script>
<?php include template('member', 'footer'); ?>